From 7341c92eda8bab1905b823b9d365addc55525cf8 Mon Sep 17 00:00:00 2001 From: robertl Date: Wed, 14 Aug 2002 16:22:07 +0000 Subject: [PATCH] Mapsend files are binary. This matters on dos-based OSes. --- mapsend.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mapsend.c b/mapsend.c index ac4980553..3e6267b19 100644 --- a/mapsend.c +++ b/mapsend.c @@ -50,7 +50,7 @@ test_endianness(void) static void mapsend_rd_init(const char *fname) { - mapsend_file_in = fopen(fname, "r"); + mapsend_file_in = fopen(fname, "rb"); if (mapsend_file_in == NULL) { fprintf(stderr, "Cannot open '%s' for reading\n", fname); exit(1); @@ -166,7 +166,7 @@ my_fwrite4(void *ptr, FILE *stream) static void mapsend_wr_init(const char *fname) { - mapsend_file_out = fopen(fname, "w"); + mapsend_file_out = fopen(fname, "wb"); if (mapsend_file_out == NULL) { fprintf(stderr, "Cannot open '%s' for writing\n", fname); exit(1); -- 2.30.2